#include "usmart.h"
#include "usmart_str.h"	   
////////////////////////////�û�������///////////////////////////////////////////////
//������Ҫ�������õ��ĺ�����������ͷ�ļ�(�û��Լ����)
#include "usart.h"
//#include "malloc.h"
#include "led/led.h"
#include "flash/flash.h"
#include "beep.h"
#include "pwm.h"
#include "oled.h"
 
//�������б��ʼ��(�û��Լ����)
//�û�ֱ������������Ҫִ�еĺ�����������Ҵ�
struct _m_usmart_nametab usmart_nametab[]=
{
#if USMART_USE_WRFUNS==1 	//���ʹ���˶�д����
	(void*)read_addr,"u32 read_addr(u32 addr)",
	(void*)write_addr,"void write_addr(u32 addr,u32 val)",	 
#endif
	(void*)LED1_Toggle,"void LED1_Toggle(void)",
	(void*)FLASH_Debug,"void FLASH_Debug(unsigned int addr, unsigned char opType, unsigned int len)",
	(void*)PWM_SetCompare,"void PWM_SetCompare(int ch, int value)",
	(void*)Beep_SetFreq,"void Beep_SetFreq(int freq)",
	(void*)Beep_PlayTone,"void Beep_PlayTone(short toneIdx)",
	(void*)Beep_PlayMusic,"void Beep_PlayMusic(short musicIdx)",
	(void*)OLED_PushLog,"void OLED_PushLog(unsigned char *log)",
	//(void*)WM8978_Write_Reg,"u8 WM8978_Write_Reg(char reg,short val)",

//	(void*)delay_ms,"void delay_ms(u16 nms)",
//	(void*)delay_us,"void delay_us(u32 nus)",
//	(void*)LCD_Clear,"void LCD_Clear(u16 Color)",
//	(void*)LCD_Fill,"void LCD_Fill(u16 xsta,u16 ysta,u16 xend,u16 yend,u16 color)",
//	(void*)LCD_DrawLine,"void LCD_DrawLine(u16 x1, u16 y1, u16 x2, u16 y2)",
//	(void*)LCD_DrawRectangle,"void LCD_DrawRectangle(u16 x1, u16 y1, u16 x2, u16 y2)",
//	(void*)Draw_Circle,"void Draw_Circle(u16 x0,u16 y0,u8 r)",
//	(void*)LCD_ShowNum,"void LCD_ShowNum(u16 x,u16 y,u32 num,u8 len,u8 size)",
//	(void*)LCD_ShowString,"void LCD_ShowString(u16 x,u16 y,u16 width,u16 height,u8 size,u8 *p)",
//	(void*)LCD_ReadPoint,"u16 LCD_ReadPoint(u16 x,u16 y)",
//
//	(void*)fsmc_sram_test_write,"void fsmc_sram_test_write(u32 addr,u8 data)",
//	(void*)fsmc_sram_test_read,"u8 fsmc_sram_test_read(u32 addr)",
//
// 	(void*)mymalloc,"void *mymalloc(u8 memx,u32 size)",
//	(void*)myfree,"void myfree(u8 memx,void *ptr)",
	
};						  
///////////////////////////////////END///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
//�������ƹ�������ʼ��
//�õ������ܿغ���������
//�õ�����������
struct _m_usmart_dev usmart_dev=
{
	usmart_nametab,
	usmart_init,
	usmart_cmd_rec,
	usmart_exe,
	usmart_scan,
	sizeof(usmart_nametab)/sizeof(struct _m_usmart_nametab),//��������
	0,	  	//��������
	0,	 	//����ID
	1,		//������ʾ����,0,10����;1,16����
	0,		//��������.bitx:,0,����;1,�ַ���	    
	0,	  	//ÿ�������ĳ����ݴ��,��ҪMAX_PARM��0��ʼ��
	0,		//�����Ĳ���,��ҪPARM_LEN��0��ʼ��
};   



















